package edu.citadel.domain;

import edu.citadel.db.EmployeeDao;
import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;

import java.util.List;

/**
 * User: jordan
 * Date: 3/10/13
 * Time: 1:37 PM
 */
@Configurable(autowire = Autowire.BY_TYPE)
public class Employee extends Contact {

    @Autowired
    private EmployeeDao employeeDao;
    private int employeeId;
    private double wage;
    private String ssn;
    private List<Work> workList;

    public void setEmployeeDao(EmployeeDao employeeDao) {
        this.employeeDao = employeeDao;
    }

    public void save() {
        employeeDao.save(this);
    }

    public void addWork(Work work) {
        this.workList.add(work);
    }

    public List<Work> getWorkList() {
        return workList;
    }

    public void setWorkList(List<Work> workList) {
        this.workList = workList;
    }

    public int getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(int employeeId) {
        this.employeeId = employeeId;
    }

    public double getWage() {
        return wage;
    }

    public void setWage(double wage) {
        this.wage = wage;
    }

    public String getSsn() {
        return ssn;
    }

    public void setSsn(String ssn) {
        this.ssn = ssn;
    }
}
